﻿// See https://aka.ms/new-console-template for more information
public class Sushu
{
    public static void Main()
    {
        string a = Console.ReadLine();
        HashSet<int> set = new HashSet<int>();
        int b = int.Parse(a);
        int c = b;
        for (int i = 2; i < c; i++)
        {
            while (b % i == 0&&i!=b)
            {
                set.Add(i);
                b = b / i;
            }
        }
        foreach(int i in set) { Console.WriteLine(i); }
        Console.WriteLine(b);
    }
}

